﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CSConsoleTest
{
    class MyForm : System.Windows.Forms.Form
    {
        private GroupBox gbWeapon;
        private Label lbDescription;
        private TextBox tbDescription;
        private Label lbAbility;
        private CheckBox cbAbilityIce;
        private CheckBox cbAbilityFire;
        private ComboBox cobWeaponType;
        private Label lbWeaponType;

        private string[] weaponTypes;

        public MyForm()
        {
            this.MouseDown += new MouseEventHandler(MyMouseEventHandler);

            weaponTypes = new string[] { "Gun", "Knife", "Sword", "Axe", "Rocket Launcher"};
        }

        public void MyMouseEventHandler(object aSender, MouseEventArgs aEventArgs)
        {
            Console.WriteLine("Sender : {0}, X : {1}, Y : {2}, Button : {3}, Clicks : {4}", ((Form)aSender).Text, aEventArgs.X, aEventArgs.Y, aEventArgs.Button, aEventArgs.Clicks);
        }

        private void InitializeComponent()
        {
            this.gbWeapon = new System.Windows.Forms.GroupBox();
            this.lbDescription = new System.Windows.Forms.Label();
            this.tbDescription = new System.Windows.Forms.TextBox();
            this.lbAbility = new System.Windows.Forms.Label();
            this.cbAbilityIce = new System.Windows.Forms.CheckBox();
            this.cbAbilityFire = new System.Windows.Forms.CheckBox();
            this.cobWeaponType = new System.Windows.Forms.ComboBox();
            this.lbWeaponType = new System.Windows.Forms.Label();
            this.gbWeapon.SuspendLayout();
            this.SuspendLayout();
            // 
            // gbWeapon
            // 
            this.gbWeapon.Controls.Add(this.lbDescription);
            this.gbWeapon.Controls.Add(this.tbDescription);
            this.gbWeapon.Controls.Add(this.lbAbility);
            this.gbWeapon.Controls.Add(this.cbAbilityIce);
            this.gbWeapon.Controls.Add(this.cbAbilityFire);
            this.gbWeapon.Controls.Add(this.cobWeaponType);
            this.gbWeapon.Controls.Add(this.lbWeaponType);
            this.gbWeapon.Location = new System.Drawing.Point(12, 12);
            this.gbWeapon.Name = "gbWeapon";
            this.gbWeapon.Size = new System.Drawing.Size(255, 238);
            this.gbWeapon.TabIndex = 0;
            this.gbWeapon.TabStop = false;
            this.gbWeapon.Text = "Weapon";
            // 
            // lbDescription
            // 
            this.lbDescription.AutoSize = true;
            this.lbDescription.Location = new System.Drawing.Point(16, 114);
            this.lbDescription.Name = "lbDescription";
            this.lbDescription.Size = new System.Drawing.Size(68, 12);
            this.lbDescription.TabIndex = 6;
            this.lbDescription.Text = "Description";
            // 
            // tbDescription
            // 
            this.tbDescription.Location = new System.Drawing.Point(18, 129);
            this.tbDescription.Multiline = true;
            this.tbDescription.Name = "tbDescription";
            this.tbDescription.Size = new System.Drawing.Size(218, 88);
            this.tbDescription.TabIndex = 5;
            // 
            // lbAbility
            // 
            this.lbAbility.AutoSize = true;
            this.lbAbility.Location = new System.Drawing.Point(16, 62);
            this.lbAbility.Name = "lbAbility";
            this.lbAbility.Size = new System.Drawing.Size(39, 12);
            this.lbAbility.TabIndex = 4;
            this.lbAbility.Text = "Ability";
            // 
            // cbAbilityIce
            // 
            this.cbAbilityIce.AutoSize = true;
            this.cbAbilityIce.Location = new System.Drawing.Point(69, 77);
            this.cbAbilityIce.Name = "cbAbilityIce";
            this.cbAbilityIce.Size = new System.Drawing.Size(41, 16);
            this.cbAbilityIce.TabIndex = 3;
            this.cbAbilityIce.Text = "Ice";
            this.cbAbilityIce.UseVisualStyleBackColor = true;
            // 
            // cbAbilityFire
            // 
            this.cbAbilityFire.AutoSize = true;
            this.cbAbilityFire.Location = new System.Drawing.Point(18, 77);
            this.cbAbilityFire.Name = "cbAbilityFire";
            this.cbAbilityFire.Size = new System.Drawing.Size(45, 16);
            this.cbAbilityFire.TabIndex = 2;
            this.cbAbilityFire.Text = "Fire";
            this.cbAbilityFire.UseVisualStyleBackColor = true;
            // 
            // cobWeaponType
            // 
            this.cobWeaponType.FormattingEnabled = true;
            this.cobWeaponType.Location = new System.Drawing.Point(56, 25);
            this.cobWeaponType.Name = "cobWeaponType";
            this.cobWeaponType.Size = new System.Drawing.Size(121, 20);
            this.cobWeaponType.TabIndex = 1;
            // 
            // lbWeaponType
            // 
            this.lbWeaponType.AutoSize = true;
            this.lbWeaponType.Location = new System.Drawing.Point(16, 28);
            this.lbWeaponType.Name = "lbWeaponType";
            this.lbWeaponType.Size = new System.Drawing.Size(34, 12);
            this.lbWeaponType.TabIndex = 0;
            this.lbWeaponType.Text = "Type";
            // 
            // MyForm
            // 
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Controls.Add(this.gbWeapon);
            this.Name = "MyForm";
            this.Text = "TestForm";
            this.Load += new System.EventHandler(this.MyForm_Load);
            this.gbWeapon.ResumeLayout(false);
            this.gbWeapon.PerformLayout();
            this.ResumeLayout(false);

        }

        private void MyForm_Load(object sender, EventArgs e)
        {

            foreach (string weaponType in weaponTypes)
            {
                cobWeaponType.Items.Add(weaponType);
            }
        }
    }
}
